package com.yinhai.asynctask;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;

public class CommonDialogNew extends Activity {
	private Context context;

	public CommonDialogNew(Context context) {
		this.context = context;
	}

	public Context getContext() {
		return context;
	}

	public void setContext(Context context) {
		this.context = context;
	}

	public ProgressDialog createDefaultDialog() {
		// 定义对话框进度条对象
		return ProgressDialog.show(this.context,"","正在加载请稍候...  ",true);
		
		
		/*ProgressDialog dialog = new ProgressDialog(this.context);

		// 设置进度条标题
		dialog.setTitle("网络连接");
		// 设置进度条内容
		dialog.setMessage("正在加载请稍候!");
		dialog.setProgressStyle(style)
		// 设置是否显示进度值默认进度条设置true或false都不显示
		dialog.setIndeterminate(false);
		// 设置是否按back键取消
		dialog.setCancelable(false);
		return dialog;*/
	}
}
